package com.promote.algorithm;

/**
 * @ClassName ReplaceSpace
 * Description 替换空格
 * @Author lizihao
 * Date 2021/3/30 9:58
 * @Version 1.0
 **/
public class ReplaceSpace {

    public static void main(String[] args) {

        String s = "We are happy.";
        String replaceSpace = replaceSpace(s);
        System.out.println(replaceSpace);
    }
    public static String replaceSpace(String demo) {

        String result = demo.replaceAll(" ", "%20");

        return result;
    }
 }
